package com.cf.game.im.model;

import com.cf.crud.entity.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * boot-awm-Chat
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/6/28 上午 10:25
 */
@Entity
@Table(name = "chatMsg")
public class ChatMsg extends BaseEntity {

    private long sender;

    private long receive;

    @Column(name = "messageType")
    private String messageType;

    @Column(name = "chatTime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date chatTime = new Date();

    private boolean ack = false;

    private String content;

    //客户端传过来的唯一标示

    @Column(name = "uinId")
    private String uinId;

    private String extra;

    public String getExtra() {
        return extra;
    }

    public void setExtra(String extra) {
        this.extra = extra;
    }

    public String getUinId() {
        return uinId;
    }

    public void setUinId(String uinId) {
        this.uinId = uinId;
    }

    public String getMessageType() {
        return messageType;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    public boolean isAck() {
        return ack;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public boolean getAck() {
        return ack;
    }

    public void setAck(boolean ack) {
        this.ack = ack;
    }


    public long getSender() {
        return sender;
    }

    public void setSender(long sender) {
        this.sender = sender;
    }

    public long getReceive() {
        return receive;
    }

    public void setReceive(long receive) {
        this.receive = receive;
    }

    public Date getChatTime() {
        return chatTime;
    }

    public void setChatTime(Date chatTime) {
        this.chatTime = chatTime;
    }

    @Override
    public String toString() {
        return "ChatMsg{" +
                "sender=" + sender +
                ", receive=" + receive +
                ", messageType='" + messageType + '\'' +
                ", chatTime=" + chatTime +
                ", ack=" + ack +
                ", content='" + content + '\'' +
                ", id=" + id +
                ", od=" + od +
                ", del=" + del +
                '}';
    }
}
